﻿#region Creditos

/* Autor: Edilberto Sánchez Forero	*/
/* Email: esanchezfo@gmail.com		*/
/* Licencia: LGPL, Software Libre	*/
/* País: Colombia, Bogotá			*/

#endregion

#region Librerias

using System;
using System.Net.Sockets;

using ESF.General;
using System.Net;
using System.Collections.Generic;
using System.IO;

#endregion


namespace ESF.Peer
{
	public interface IReceiver
	{
		#region Eventos
		
		event Action<Socket> OnClientConnection;
		event Action<Socket, Stream> OnReceive;
		event Action<Socket> OnStopForMaxReceiveSize;
		event Action<Socket> OnConnectionUnused;
		event Action<IPEndPoint, Exception> OnClientDisconnected;
		
		#endregion
		
		
		#region Funciones
		
		void Stop ();
				
		void Start ();

		#endregion


		#region Propiedades
		
		IPEndPoint IPEndPoint { set; get; }
		
		int MaxConnections { set; get; }

		int ReceiveTimeoutMS { set; get; }

		int ReadBufferLength { set; get; }

		int ReceiveWaitTimeoutMS { set; get; }

		int MaxFileReceiveSizeBytes { set; get; }
		
		#endregion
	}
}
